<template>
	<view>
		<!-- 导航 -->
		<!-- <u-navbar back-text="确认订单" back-icon-color="#000000" style="font-weight: bold;font-family: PingFang SC;"></u-navbar> -->
		<!-- end v-if="shows" -->
		<scroll-view style="height:100vh;" lower-threshold="20" @scrolltolower="scrolltolower" scroll-y="true"
			class="scroll-Y">
			<view v-if="!addressId || addressId == 0" @click="adds(2)"
				style="width: 92%; margin: 0 auto;line-height: 80rpx;font-size: 26rpx;color: #323332;display: flex;border-bottom:20rpx solid #F9FAFB;">
				<view style="display: flex;margin-right: 10rpx;width: 90%;">请选择服务地址</view>
				<view style="width: 10%;text-align: right;">
					<image src="../../static/icon/jian.png" mode=""
						style="width: 14rpx;height: 24rpx;margin-top: 4rpx;"></image>
				</view>
			</view>
			<view v-else style="padding: 20rpx 0;border-bottom:20rpx solid #F9FAFB;">
				<view style="width: 92%; margin: 0 auto;display: flex;" @click="adds(2)">
					<view style="width: 14%;margin-top: 24rpx;">
						<view
							style="width: 72rpx;height: 72rpx;background-color: #FCC800;border-radius: 50%;display: flex;justify-content: center;align-items: center;">
							<u-icon  name="map" color="#fff" size="50"></u-icon>
						</view>
					</view>
					<view style="width: 78%;">
						<view style="font-weight: bold;color: #323332;">
							<text class="namm"
								style="font-size: 30rpx;">{{ address.contactsName ? address.contactsName : '' }}</text>
							<text class="namm"
								style="font-size: 26rpx;padding-left: 20rpx;">{{ address.contactsPhone ? address.contactsPhone : '' }}</text>
						</view>
						<view style="color: #323332;letter-spacing: 1rpx;">
							{{ address.province ? address.province : '' }}{{ address.city ? address.city : '' }}{{ address.region ? address.region : ''
							}}{{ address.address ? address.address : '' }}
						</view>
					</view>
					<view style="width: 8%;text-align: right;">
						<image style="margin-top: 50rpx;float;width: 14rpx;height: 24rpx;margin-left: 25rpx;"
							src="../../static/icon/jian.png" mode=""></image>
					</view>
				</view>
			</view>
			<view style="width: 100%;position: relative;" @click="updataServer">
				<view
					style="align-items: center;justify-content: space-between;display: flex;width: 92%;margin:  0 auto;padding: 16rpx 0;">
					<view style="display: flex;align-items: center;">
						<image style="width: 180rpx;height: 108rpx;" :src="pageParam.img" mode="aspectFill"></image>
					</view>
					<view class="xuanze">
						<view style="color: #323332;">{{ form.value }}</view>
						<image style="margin-top: 4rpx;width: 14rpx;height: 24rpx;margin-left: 25rpx;"
							src="../../static/icon/jian.png" mode=""></image>
					</view>
					<!-- 调整详细服务 -->
				</view>
				<view style="position: absolute;top: 28rpx;left: 0rpx;" @click="lookServer">
					<image style="width: 152rpx;height: 92rpx;"
						src="https://beedao.oss-cn-beijing.aliyuncs.com/1c32a8994b1a46399cc5ababb5dee590.png" mode="">
					</image>
				</view>
			</view>

			<u-select style="line-height: 32rpx;width: 4%;" title="调整详细服务" v-model="showUpdata" mode="mutil-column-auto"
				:list="typeList" confirm-color="#FCC800" @confirm="confirmUpdata"></u-select>
			<!-- 调整面积 -->
			<u-popup mode="bottom" v-model="showProportion">
				<view style="width: 100%;position: absolute;top: 0;left: 0;">
					<view style="width: 100%;position: relative;">
						<view
							style="color: #323332; width: 100%;text-align: center;font-size: 30rpx;font-weight: bold;line-height: 80rpx;">
							请输入服务面积</view>
						<image @click="proportion = false"
							style="position: absolute;top: 26rpx;right: 24rpx;width: 24rpx;height: 24rpx;position: absolute;"
							src="https://beedao.oss-cn-beijing.aliyuncs.com/94babc7b1aa54980a1abb68a5319c31f.png"
							mode=""></image>
					</view>
				</view>
				<view style="margin-top: 94rpx;width: 100%;padding: 40rpx 0;">
					<view style="width: 88%;margin: 0 auto;position: relative;">
						<input @blur="inputNumChange" @focus="inputNumInput"
							:style="{ border: isInputNum == 1 ? '1rpx solid #FCC800' : '1rpx solid #D0D0D0' }"
							v-model="form.num" type="number"
							style="border-radius: 8rpx; color: #323332;padding: 16rpx 20rpx;" placeholder="请输入服务面积"
							placeholder-style="color:#D0D0D0;" />
						<view
							style="color: #999999;font-size:24rpx ;position: absolute;right: 24rpx;top:4rpx;line-height: 70rpx;">
							m²</view>
					</view>
					<view style="color: #F84914;font-size: 24rpx;width: 88%;margin: 6rpx auto;">
						最小预约数量为{{ form.minSelect }}平方米</view>
				</view>
				<view style="width: 100%;height: 150rpx;"></view>
				<view
					style="position: fixed;z-index: 99;background-color: #ffffff;bottom: 0;width: 100%;font-size: 26rpx;color: #707070;border-top: 1rpx solid #DFDFDF;">
					<view style="width: 92%;margin: 0 auto;padding:12rpx 0 20rpx 0">
						<view @click="subProportion"
							style="font-size: 30rpx; width: 100%;background-color:#FCC800 ;line-height: 80rpx;text-align: center;color:#333333 ;border-radius: 10rpx;">
							确定
						</view>
					</view>
				</view>
			</u-popup>
			<!-- 调整面积结束 -->
			<!-- 调整规格内容 -->
			<u-popup mode="bottom" v-model="showServer">
				<view>
					<scroll-view style="width: 100%;margin-bottom: 124rpx;white-space: nowrap;display: flex;"
						:style="{ height: comHeight }" lower-threshold="10" scroll-y="true" class="scroll-Y">
						<view style="width: 100%;">
							<view style="width: 100%;position: relative;">
								<view
									style="color: #323332; width: 100%;text-align: center;font-size: 30rpx;font-weight: bold;line-height: 80rpx;">
									选择服务内容</view>
								<image @click="showServer = false"
									style="position: absolute;top: 26rpx;right: 24rpx;width: 24rpx;height: 24rpx;position: absolute;"
									src="https://beedao.oss-cn-beijing.aliyuncs.com/94babc7b1aa54980a1abb68a5319c31f.png"
									mode=""></image>
							</view>
						</view>
						<view style="width: 94%;margin: 0 auto;display: flex;flex-wrap: wrap;"
							v-if="serverList.length > 0">
							<view v-for="(items, itee) in serverList" :key="itee" :style="{
									background: items.specificId == selectFrom.id ? '#fff9e2' : '#ffffff',
									border: items.specificId == selectFrom.id ? ' 1rpx solid #d6aa00' : '1rpx solid #d0d0d0'
								}" @click="selectMake(items)"
								style="width:46%;padding: 10rpx;border-radius: 8rpx;margin:0 12rpx;margin-top: 10rpx;margin-bottom: 10rpx;">
								<view
									style="font-size: 28rpx;color: #323332;margin-bottom: 8rpx;font-weight: 500;text-align: left;display:block;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;">
									{{ items.name }}
								</view>
								<view style="width: 100%;display: flex;justify-content: space-between;">
									<view
										style="padding: 0 8rpx;color: #F84914; height: 52rpx;line-height: 52rpx;text-align: center; background: #FFECE7;border-radius: 4rpx;">
										<text style="font-size: 24rpx;">￥</text>
										<text
											style="font-size: 36rpx;">{{ items.reducedPrice && items.reducedPrice !== '' ? items.reducedPrice : items.marketPrice }}</text>
									</view>
									<view></view>
								</view>
								<view style="width: 100%;color: #999999;margin-top: 8rpx;">
									<view style="width: 50%;text-align: left;font-size: 22rpx;"
										v-show="items.reducedPrice && items.reducedPrice !== ''">
										<text>原价</text>
										<text style="text-decoration: line-through;">{{ items.marketPrice }}</text>
									</view>
								</view>
							</view>
							<view style="margin: 20rpx 0;text-align: right;width: 100%;">
								<u-number-box v-model="selectFrom.num" :min="1" :max="10000"></u-number-box>
							</view>
						</view>
					</scroll-view>
					<view
						style="position: fixed;z-index: 99;background-color: #ffffff;bottom: 0;width: 100%;font-size: 26rpx;color: #707070;border-top: 1rpx solid #DFDFDF;">
						<view style="width: 92%;margin: 0 auto;padding:12rpx 0 20rpx 0">
							<view @click="subSpecification"
								style="font-size: 30rpx; width: 100%;background-color:#FCC800 ;line-height: 80rpx;text-align: center;color:#333333 ;border-radius: 10rpx;">
								确定
							</view>
						</view>
					</view>
				</view>
			</u-popup>
			<!-- 服务时间 -->
			<view class="time"
				style="align-items: center;justify-content: space-between;border-bottom:20rpx solid #F9FAFB;border-top:20rpx solid #F9FAFB;">
				<view style="display: flex;align-items: center;">
					<view class="start">服务时间</view>
				</view>
				<view class="xuanze" @click="is_show()">
					<view style="color: #323332;" v-if="form.result">{{ form.result }}</view>
					<view style="color: #A6A6A6;" v-else>请选择服务时间</view>
					<image style="margin-top: 4rpx;width: 14rpx;height: 24rpx;margin-left: 25rpx;"
						src="../../static/icon/jian.png" mode=""></image>
				</view>
			</view>
			<!-- 选择服务时间 -->
			<u-popup mode="bottom" v-model="show">
				<view style="width: 100%;position: absolute;top: 0;left: 0;">
					<view style="width: 100%;position: relative;">
						<view
							style="color: #323332; width: 100%;text-align: center;font-size: 30rpx;font-weight: bold;line-height: 80rpx;">
							选择服务时间</view>
						<image @click="show = false"
							style="position: absolute;top: 26rpx;right: 24rpx;width: 24rpx;height: 24rpx;position: absolute;"
							src="https://beedao.oss-cn-beijing.aliyuncs.com/94babc7b1aa54980a1abb68a5319c31f.png"
							mode=""></image>
					</view>
				</view>
				<view style="margin-top: 94rpx;width: 100%;margin-bottom: 20rpx;">
					<view
						style="width: 92%;margin: 0 auto;display: flex;justify-content: center;flex-wrap: nowrap;padding: 36rpx 0;">
						<view @click="selectData(item)" v-for="(item, ind) in list" :key="ind" style="width: 14%;">
							<view :style="{ color: selectDemo.tTime == item.value ? '#F2A027' : '#323332' }"
								style="text-align: center;width: 100%;line-height: 40rpx;font-size: 30rpx;font-weight: bold;">
								{{ item.timeName }}
							</view>
							<view style="margin-top: 8rpx;width: 100%;">
								<view
									:style="{ color: selectDemo.tTime == item.value ? '#fff' : '#A6A6A6', 'background-color': selectDemo.tTime == item.value ? '#F2A027' : '#fff' }"
									style="border-radius: 50rpx; line-height: 52rpx;text-align: center; width: 52rpx;height: 52rpx;margin: 0 auto;color: #A6A6A6;">
									{{ item.label }}
								</view>
							</view>
						</view>
					</view>
					<view
						style="width: 92%;margin: 0 auto;display: flex;justify-content: flex-start;flex-wrap: wrap;border-top: 1rpx solid #F3F3F3;padding: 20rpx 0;">
						<view @click="selectHtime(item)" v-for="(item, inde) in listTime" :key="inde"
							style="width: 20%;padding: 24rpx 16rpx;">
							<view :style="{
									color: selectDemo.ctTime == item.value ? '#fff' : '#A6A6A6',
									'background-color': selectDemo.ctTime == item.value ? '#F2A027' : '#fff',
									border: selectDemo.ctTime == item.value ? '1rpx solid #F2A027' : '1rpx solid #DFDFDF'
								}" style="padding: 4rpx 0; text-align: center;width: 100%;line-height: 40rpx;font-size: 30rpx;">
								{{ item.label }}
							</view>
						</view>
					</view>
					<view v-if="openGroup == 1" style="width: 92%;margin: 0 auto;font-size: 28rpx;line-height: 60rpx;">
						<text style="color: #F84914;">*</text>
						<text style="color: #323332;margin-left: 8rpx;">拼成时间不确定，拼成后可能需要重新协调服务时间</text>
					</view>
				</view>

				<view
					style="background-color: #ffffff;width: 100%;font-size: 26rpx;color: #707070;border-top: 1rpx solid #DFDFDF;">
					<view style="width: 92%;margin: 0 auto;padding:24rpx 0 20rpx 0">
						<view @click="confirm"
							style="font-size: 30rpx; width: 100%;background-color:#FCC800 ;line-height: 80rpx;text-align: center;color:#333333 ;border-radius: 10rpx;">
							确定
						</view>
					</view>
				</view>
			</u-popup>
			<!-- 服务时间结束 -->
			<view
				style="width: 92%;padding: 30rpx 0;margin:0rpx auto;display: flex;align-items: center;justify-content: space-between;border-bottom: 1rpx solid #F3F3F3;">
				<view style="display: flex;align-items: center;">
					<image style="width:38rpx ;height: 38rpx;margin-right: 10rpx;"
						src="https://beedao.oss-cn-beijing.aliyuncs.com/d2749e47a90446928a84593e378f9f68.png"></image>
					<view class="start">优惠券</view>
				</view>
				<view @tap="jump_yhq" class="xuanze">
					<view class="" v-if="balancesForm.userCouponId > 0">
						<text>-￥{{ balancesForm.couponReduce }}</text>
					</view>
					<view class="" v-else>暂无可用</view>
					<image style="margin-top: 4rpx;width: 14rpx;height: 24rpx;margin-left: 25rpx;"
						src="../../static/icon/jian.png" mode=""></image>
				</view>
			</view>
			<!-- <view style="width: 92%;margin: auto;display: flex;align-items: center;justify-content: space-between;padding: 24rpx 0;" @click="radioChange()">
				<view style="display: flex;align-items: center;">
					<view class="start">
						积分抵扣
						<text style="font-size: 24rpx;">（可使用{{ balancesForm.canUseBalance || '0' }}积分抵扣{{ balancesForm.balanceReduce }}元）</text>
					</view>
				</view>
				<view class="" style="margin-right: -15rpx;">
					<label style="font-size:28upx;text-align: right;"><radio style="transform: scale(0.7);" color="#F84914" :checked="form.checkeds" /></label>
				</view>
			</view> -->
			<!-- 积分抵扣结束 -->
			<!-- 选择商家 -->
			<view style="width: 100%;line-height: 100rpx;background-color: #F9FAFB;">
				<view style="width: 92%;margin: 0 auto;display: flex;justify-content: space-between;">
					<view style="font-size: 28rpx;color: #323332;font-size: 30rpx;font-weight: bold;">选择服务商家</view>
					<view style="position: relative;">
						<view @click="form.showCondition = !form.showCondition">
							<text style="color: #323332;font-size: 30rpx;">{{ form.conditionTitle }}</text>
							<u-icon v-if="form.showCondition" name="arrow-up-fill" style="margin-left: 8rpx;"
								color="#BBBBBB" size="20"></u-icon>
							<u-icon v-if="!form.showCondition" name="arrow-down-fill" style="margin-left: 8rpx;"
								color="#BBBBBB" size="20"></u-icon>
						</view>
						<view v-show="form.showCondition"
							style="z-index: 99; position: absolute;right: 0;top: 88rpx;padding:10rpx 16rpx;background-color: #fff;box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);">
							<view @click="goSearch(itopti)" v-for="itopti in options1"
								style="line-height: 60rpx;width: 140rpx;text-align: center;font-size: 26rpx;color: #323332;">
								{{ itopti.label }}
							</view>
						</view>
					</view>
				</view>
			</view>
			<view style="width: 100%;margin: 0 auto;">
				<view @click="updataEnt(item)" v-for="(item, index6) in dataList" :key="index6"
					style="width: 100%;padding: 24rpx 0;display: flex;position: relative; border-bottom: 1rpx solid #F3F3F3;">
					<view style="width: 14%;text-align: center;">
						<radio style="margin-top: 46rpx; transform: scale(0.7);" color="#F84914"
							:checked="form.entId == item.enterpriseId ? true : false" />
					</view>
					<view style="width: 48%;">
						<view style="color: #323332;display: flex;width: 100%;">
							<view
								style="width: 100%; font-size:32rpx ;color:#333333;display:block;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;">
								{{ item.name }}
							</view>
							<view
								style="width: 100rpx;text-align: center;font-size: 24rpx;height: 26rpx;margin-top: 11rpx;line-height: 26rpx;color: #333333;background-color: #FCC800;margin-left: 10rpx;">
								{{ item.score }}分
							</view>
						</view>
						<view style="color: #999999;line-height: 56rpx;font-size: 24rpx;">
							已为
							<text style="color: #333333;">{{ item.serverNum ? item.serverNum : 0 }}</text>
							个家庭提供服务
						</view>
						<view style="display: flex;line-height: 30rpx;font-size: 22rpx;color: #6F6F6F;">
							<view style="display: flex;margin-right: 10rpx;" v-for="(items, index1) in advantage"
								:key="index1">
								<view
									style="width: 24rpx;line-height: 24rpx;height: 24rpx;text-align: center;background-color: #30A5FF;border-radius: 20rpx;margin-top: 4rpx;">
									<u-icon name="checkbox-mark" size="20" color="#fff"></u-icon>
								</view>
								<view style="margin-left: 8rpx;">{{ items }}</view>
							</view>
						</view>
					</view>
					<view style="width: 38%;" v-if="item.couponPrice == 0">
						<view style="padding-right: 30rpx;" v-if="item.reducedPrice && item.reducedPrice !== ''">
							<view style="text-align: right;color: #747373;font-size: 36rpx;">￥{{ item.reducedPrice }}
							</view>
							<view style="display: flex;text-align: right;justify-content: flex-end;">
								<view
									style="display:block;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;font-size: 22rpx;line-height: 40rpx;color: #6F6F6F;text-decoration: line-through;display: inline-block;">
									￥{{ item.univalence }}
								</view>
							</view>
						</view>
						<view style="padding-right: 30rpx;" v-else>
							<view style="text-align: right;color: #747373;font-size: 36rpx;">￥{{ item.univalence }}
							</view>
						</view>
					</view>
					<view style="width: 38%;" v-else>
						<view v-if="item.activityName"
							style="border-bottom-left-radius: 8rpx;padding: 0rpx 8rpx;display: inline-block;background: linear-gradient(to right,#FC8A67,#F84914);font-size: 20rpx;color: #fff;position: absolute;top: 0;right: 0;line-height: 36rpx;">
							{{ item.activityName}}
						</view>
						<view :style="{
						 	'margin-top': item.activityName ? '42rpx' : '0rpx',
						 }" style="display: flex;width: 100%;justify-content: flex-end; margin-top: 42rpx;padding-right: 30rpx;line-height: 50rpx;">
							<view
								style="color: #F84914;border: 1rpx solid #F84914;padding: 0px 6rpx;display: inline-block;font-size: 22rpx;height: 36rpx;line-height: 36rpx; margin-top: 7rpx;">
								劵后
							</view>
							<view style="text-align: right;color: #747373;font-size: 40rpx;">
								￥{{ item.couponPrice ? item.couponPrice : 0 }}</view>
						</view>
						<view
							style="text-align: right;color: #6F6F6F;text-decoration: line-through;font-size: 26rpx;padding-right: 30rpx;line-height: 40rpx;">
							￥{{ item.univalence }}
						</view>
					</view>
				</view>
			</view>
			<view :style="{height:openGroup == 1 && groupType == 0?'125px':'58px'}" style="width: 100%;"></view>
			<!-- 选择商家结束 -->
			<view class="foot">
				<view v-if="(openGroup == 1 && groupType == 0) || (openGroup == 1 && groupType == 1)"
					style="width: 100%;height: 80rpx;display: flex;align-items: center;background-color: #707070;justify-content: center;">
					<view style="line-height: 80rpx;">
						<text style="font-size: 34rpx;color: #FCC800;">1</text>
						<text style="font-size: 26rpx;color: #ffffff;">人拼团，邀请一人再优惠</text>
						<text style="font-size: 34rpx;color: #FCC800;">{{groupForm.groupReduce}}元</text>
					</view>
					<view style="display: flex;align-items: center;justify-content: center;margin-left: 36rpx;">
						<view style="border-bottom: 1rpx solid #FCC800;color: #FCC800;font-size: 26rpx;">发起拼团</view>
					</view>
				</view>
				<view v-if="groupType == 2"
					style="width: 100%;height: 80rpx;display: flex;align-items: center;background-color: #707070;justify-content: center;">
					<view style="line-height: 80rpx;">
						<text style="font-size: 26rpx;color: #ffffff;">{{groupForm.groupLeaderName}} 邀请您拼团，本团还差</text>
						<text style="font-size: 34rpx;color: #FCC800;">1</text>
						<text style="font-size: 26rpx;color: #ffffff;">人，拼成减</text>
						<text
							style="font-size: 34rpx;color: #FCC800;">{{groupForm.groupReduce?groupForm.groupReduce:0}}元</text>
					</view>
				</view>

				<view v-if="openGroup == 1"
					style="width: 92%;margin: 0 auto;display: flex;align-items: center;justify-content: space-between;text-align: center;padding: 22rpx 0px;">
					<view @click="is_mingxi()" style="display: flex;color: #fa5151;">
						<view>明细</view>
						<view style="margin-left: 10rpx;">
							<u-icon name="arrow-up" color="#fa5151" size="20"></u-icon>
						</view>
					</view>
					<view style="width: 76%;height:100rpx;color: #323332;font-size: 30rpx;">
						<view style="display: flex;">
							<view @click="fast()"
								style="background-color: #FFFFFF;border-radius: 10rpx;border:1rpx solid #979797 ;width: 49%;margin-right: 2%;padding: 10rpx 0;">
								<view>单独购买</view>
								<view>￥{{balancesForm.totalPay?balancesForm.totalPay:0}}</view>
							</view>
							<view @click="paySpell"
								style="background-color: #FCC800;border-radius: 10rpx;border:1rpx solid #FCC800 ;width: 49%;padding: 10rpx 0;">
								<view>{{groupType == 2 ? '立即参团':'发起拼团'}}</view>
								<view>￥{{balancesForm.groupPay?balancesForm.groupPay:0}}</view>
							</view>
						</view>

					</view>
				</view>
				<view v-else
					style="width: 92%;margin: 0 auto;display: flex;align-items: center;justify-content: space-between;text-align: center;padding: 22rpx 0px;">
					<view class="writes">
						<text style="color: #F84914;font-size:40rpx;">￥</text>
						<text
							style="color: #F84914;font-size: 40rpx;font-weight: bold;">{{ balancesForm.totalPay?balancesForm.totalPay:0 }}</text>
					</view>
					<view @click="is_mingxi()" style="display: flex;color: #fa5151;">
						<view>明细</view>
						<view style="margin-left: 10rpx;">
							<u-icon name="arrow-up" color="#fa5151" size="20"></u-icon>
						</view>
					</view>
					<view @click="fast()"
						style="width: 55%;height: 88rpx;border-radius: 12rpx;background-color: #FCC800;text-align: center;font-size: 34rpx;color: #323332;line-height: 88rpx;">
						预约并支付
					</view>
				</view>
			</view>
		</scroll-view>
		<!-- 选择支付 -->
		<u-popup mode="bottom" v-model="payorder">
			<view style="width: 100%;position: absolute;top: 0;left: 0;">
				<view style="width: 92%;position: relative;margin:0 auto;">
					<view style="width: 100%;text-align: left;font-size: 30rpx;font-weight: bold;line-height: 80rpx;">
						选择支付方式</view>
					<image @click="payorder=false"
						style="position: absolute;top: 26rpx;right: 24rpx;width: 24rpx;height: 24rpx;position: absolute;"
						src="https://beedao.oss-cn-beijing.aliyuncs.com/94babc7b1aa54980a1abb68a5319c31f.png" mode="">
					</image>
				</view>
			</view>
			<view class="content" style="width: 92%;margin: auto;margin-top: 94rpx;">
				<view style="margin-bottom: 20rpx;">
					<view
						style="display: flex;justify-content: space-between;padding: 20rpx 0;border-bottom: 1rpx solid #D8D8D8;"
						@click="userInfoVO.money > balancesForm.totalPay?setPayType(2):''">
						<view style="display: flex;">
							<view style="display: flex;justify-content: center;align-items: center;">
								<image style="width: 38rpx;height: 38rpx;"
									src="https://beedao.oss-cn-beijing.aliyuncs.com/3a026cf316644413ad1898dc6841881c.png"
									mode=""></image>
							</view>
							<view
								style="color: #757575;margin-left: 10rpx;display: flex;justify-content: center;align-items: center;">
								余额支付（剩余￥{{userInfoVO.money? userInfoVO.money : 0}}）</view>
						</view>
						<view v-if="userInfoVO.money > balancesForm.totalPay"
							style="padding: 8rpx 16rpx;display: flex;justify-content: center;align-items: center;">
							<image style="width: 36rpx;height: 36rpx;" :src="payType == '1' ? payImg.xImg :payImg.noImg"
								mode=""></image>
						</view>
						<view @click="goMnmber" v-else
							style="padding: 8rpx 16rpx;display: flex;justify-content: center;align-items: center;color: #676767;">
							{{userInfoVO.member ? "立即续费" : "立即开通"}}
						</view>
					</view>
					<view
						style="display: flex;justify-content: space-between;padding: 20rpx 0;border-bottom: 1rpx solid #D8D8D8;"
						@click="setPayType(1)">
						<view style="display: flex;">
							<view style="display: flex;justify-content: center;align-items: center;">
								<image style="width: 38rpx;height: 36rpx;"
									src="https://beedao.oss-cn-beijing.aliyuncs.com/297779f071654a9689c790b6395d5eaf.png"
									mode=""></image>
							</view>
							<view
								style="color: #757575;margin-left: 10rpx;display: flex;justify-content: center;align-items: center;">
								微信支付</view>
						</view>
						<view style="padding: 8rpx 16rpx;display: flex;justify-content: center;align-items: center;">
							<image style="width: 36rpx;height: 36rpx;" :src="payType == '2' ? payImg.xImg :payImg.noImg"
								mode=""></image>
						</view>
					</view>

				</view>
				<view
					style="display: flex;justify-content: space-between;align-items: center;padding:12rpx 0rpx 20rpx 0rpx;">
					<view class="writes">
						<text style="color: #757575;font-size:36rpx;">实付款：</text>
						<text style="color: #FFAA00;font-size:34rpx;">￥</text>
						<text style="color: #FFAA00;font-size: 40rpx;font-weight: bold;" v-if="groupType == 0">
							{{ balancesForm.totalPay ? balancesForm.totalPay : 0 }}
						</text>
						<text style="color: #FFAA00;font-size: 40rpx;font-weight: bold;" v-else>
							{{ balancesForm.groupPay ? balancesForm.groupPay : 0 }}
						</text>

					</view>
					<view @click="clickPay ? promptlyPay(): ''"
						style="width: 48%;height: 88rpx;border-radius: 12rpx;background-color: #FCC800;text-align: center;font-size: 34rpx;color: #323332;line-height: 88rpx;">
						立即支付
					</view>
				</view>
			</view>
		</u-popup>

		<!-- 选择支付结束 -->
		<!-- 订单明细 -->
		<u-popup mode="bottom" v-model="mingxi">
			<view style="width: 100%;position: absolute;top: 0;left: 0;">
				<view class="width: 100%;position: relative;">
					<view style="width: 100%;text-align: center;font-size: 30rpx;font-weight: bold;line-height: 80rpx;">
						订单明细</view>
					<image @click="is_mingxi()"
						style="position: absolute;top: 26rpx;right: 24rpx;width: 24rpx;height: 24rpx;position: absolute;"
						src="https://beedao.oss-cn-beijing.aliyuncs.com/94babc7b1aa54980a1abb68a5319c31f.png" mode="">
					</image>
				</view>
			</view>
			<view class="content" style="width: 92%;margin: auto;margin-top: 94rpx;">
				<view>
					<view style="display: flex;align-items: center;justify-content:space-between;margin-top:30rpx ;">
						<view style="display: flex;align-items: center;">
							<view class="start">服务项目</view>
						</view>
						<view class="">
							<view style="font-size: 24rpx;font-size: 30rpx;color: #3f3f3f;font-weight: 400;" class="">
								{{ form.value }}
							</view>
						</view>
					</view>
					<view style="display: flex;align-items: center;justify-content: space-between;margin-top:30rpx ;">
						<view style="display: flex;align-items: center;">
							<view class="start">服务价</view>
						</view>
						<view class="">
							<view style="font-size: 30rpx;color: #3f3f3f;font-weight: 400;" class="">
								<text>{{ balancesForm.totalPrice ? balancesForm.totalPrice : 0 }}元</text>
							</view>
						</view>
					</view>
					<view v-if="openGroup == 1"
						style="display: flex;align-items: center;justify-content: space-between;margin-top:30rpx ;">
						<view style="display: flex;align-items: center;">
							<view class="start">拼团优惠</view>
						</view>
						<view class="">
							<view style="font-size: 30rpx;color: #3f3f3f;font-weight: 400;" class="">
								-<text>{{ balancesForm.groupReduce ? balancesForm.groupReduce : 0 }}元</text>
							</view>
						</view>
					</view>
					<view style="display: flex;align-items: center;justify-content: space-between;margin-top:30rpx ;">
						<view style="display: flex;align-items: center;">
							<view class="start">优惠券金额</view>
						</view>
						<view class="">
							<view style="font-size: 30rpx;color: #3f3f3f;font-weight: 400;" class="">
								-<text>{{ balancesForm.couponReduce ? balancesForm.couponReduce : 0 }}元</text>
							</view>
						</view>
					</view>
					<view
						style="display: flex;align-items: center;justify-content: space-between;margin-top:30rpx ;margin-bottom:20rpx ;">
						<view style="display: flex;align-items: center;">
							<view class="start">需支付</view>
						</view>
						<view class="">
							<view style="font-size: 30rpx;color: #3f3f3f;font-weight: 400;" class="">
								￥
								<text>{{ balancesForm.totalPay }}元</text>
							</view>
						</view>
					</view>
					<view style="line-height: 60rpx;">
						<text style="color: #F84914;">*</text>
						<text style="margin-left: 5rpx;font-size: 24rpx;color: #323332;">具体服务时长以实际执行为准</text>
					</view>
				</view>
				<view v-if="openGroup == 1" class="foot_mon"
					style="padding:12rpx 0rpx 20rpx 0rpx;border-top: 1rpx solid #F5F5F5;">
					<view @click="is_mingxi()" style="display: flex;color: #fa5151;">
						<view>明细</view>
						<view style="margin-left: 10rpx;">
							<u-icon name="arrow-down" color="#fa5151" size="20"></u-icon>
						</view>
					</view>
					<view style="width: 76%;height:100rpx;color: #323332;font-size: 30rpx;">
						<view style="display: flex;">
							<view @click="fast()"
								style="background-color: #FFFFFF;border-radius: 10rpx;border:1rpx solid #979797 ;width: 49%;margin-right: 2%;padding: 10rpx 0;">
								<view style="text-align: center;">单独购买</view>
								<view style="text-align: center;">￥{{balancesForm.totalPay?balancesForm.totalPay:0}}
								</view>
							</view>
							<view @click="paySpell"
								style="background-color: #FCC800;border-radius: 10rpx;border:1rpx solid #FCC800 ;width: 49%;padding: 10rpx 0;">
								<view style="text-align: center;">{{groupType == 2 ? '立即参团':'发起拼团'}}</view>
								<view style="text-align: center;">￥{{balancesForm.groupPay?balancesForm.groupPay:0}}
								</view>
							</view>
						</view>

					</view>
				</view>
				<view v-else class="foot_mon" style="padding:12rpx 0rpx 20rpx 0rpx;border-top: 1rpx solid #F5F5F5;">
					<view class="writes">
						<text style="color: #fa5151;font-size:40rpx;">￥</text>
						<text
							style="color: #fa5151;font-size: 40rpx;font-weight: bold;">{{ balancesForm.totalPay ? balancesForm.totalPay : 0 }}</text>
					</view>
					<view @click="is_mingxi()" style="display: flex;color: #fa5151;">
						<view>明细</view>
						<view style="margin-left: 10rpx;">
							<u-icon name="arrow-down" color="#fa5151" size="20"></u-icon>
						</view>
					</view>
					<view @click="fast()"
						style="width: 55%;height: 88rpx;border-radius: 12rpx;background-color: #FCC800;text-align: center;font-size: 34rpx;color: #323332;line-height: 88rpx;">
						预约并支付
					</view>
				</view>
			</view>
		</u-popup>
		<!-- 订单明细结束 -->
		<u-toast ref="uToast" />
		<u-modal v-model="showModel" confirm-color="#F84914" :content="content"></u-modal>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				groupForm: {},
				openGroup: 0,
				groupReduce: "0",
				clickPay: true,
				payImg: {
					xImg: "https://beedao.oss-cn-beijing.aliyuncs.com/3307a934f8774ccc944183d42934e369.png",
					noImg: "https://beedao.oss-cn-beijing.aliyuncs.com/e680513bfd854e33be8f67a06f376a27.png"
				},
				userInfoVO: {}, //用户信息
				payorder: false, //支付弹框
				payType: 2, //支付方式
				options1: [{
						label: '综合排序',
						value: 1
					},
					{
						label: '评价优先',
						value: 2
					},
					{
						label: '销量优先',
						value: 3
					},
					{
						label: '价格优先',
						value: 4
					}
				],
				background: {
					backgroundColor: '#fca800'
				},
				advantage: ['每日测温', '工具消毒'],
				show: false, //服务时间
				showUpdata: false, //打开修改服务内容
				showServer: false, //打开修改规格
				list: [], //可选日期
				listTime: [], //可选时间
				typeList: [],
				address: {
					province: '',
					city: '',
					region: '',
					address: '',
					contactsPhone: '',
					contactsName: ''
				},
				mingxi: false, //费用明细
				balancesForm: {
					balanceReduce: '',
					canUseBalance: '',
					couponReduce: '',
					totalPay: '',
					totalPrice: '',
					userCouponId: 0
				},
				form: {
					result: '', //下单时间
					checkeds: true, //是否使用积分
					value: '', //服务内容
					selectServer: 0, //服务id
					num: 1, //数量
					entId: '',
					userCouponId: '',
					minSelect: 0,
					maxSelect: 0,
					condition: 1,
					conditionTitle: '综合排序',
					showCondition: false
				},
				showProportion: false,
				selectFrom: {
					id: '',
					value: '',
					num: 1
				}, //选中的服务信息
				comHeight: 0, //bode高度px
				navHeight: 0, //状态栏高度px
				offHeight: 0, //吸顶高度rpx
				serverList: [],
				pageData: {
					page: 1,
					pageSize: 10
				},
				contPage: 0,
				dataList: [], //商家列表
				noClick: true, //防止重复加载下一页
				selectDemo: {
					tTime: '',
					hTime: '',
					ctTime: '',
					chTime: ''
				}, //选中的时间日期
				pageParam: {
					businessId: '',
					title: '',
					chargeType: '',
					amount: '',
					img: '',
					entId: ''
				}, //页面传递数据
				isRefresh: 0,
				addressId: 0, //地址id
				isInputNum: 0, //是否聚焦
				showModel: false, //模态框
				content: '',
				groupType: 0, //默认不拼团
				token: '',
				orderId: '',
				siteName: '',

			};
		},
		onShow() {
			if (this.isRefresh == 1) {
				this.MatchingOrderInfo(1);
				this.getPayInfo();
				this.isRefresh = 0;
			}
			// 获取用户信息

			if (!this.token) {} else {
				this.getUserInfo();
			}
		},

		onLoad(option) {
			uni.setNavigationBarTitle({
				title: '确认订单'
			});
			uni.showLoading({
				title: "正在加载...",
				mask: true,
			})
			this.token = uni.getStorageSync('token');
			if (!this.token) {
				uni.redirectTo({
					url: "/pages/login/login?jumpType=" + 10 + "&orderId=" + option.orderId + "&groupType=" +
						option.groupType
				})
				return false;
			} else {
				if (option.groupType) {
					// this.groupType = option.groupType;
					this.orderId = option.orderId;
				}
			}
			this.getLocationInfo();

			this.pageParam = {
				businessId: option.businessId,
				title: option.title,
				chargeType: option.chargeType,
				amount: option.amount,
				bisOptionsId: option.bisOptionsId,
				img: '',
				entId: option.enterpriseId
			};

			this.form.selectServer = this.pageParam.amount;
			//解决andriod自适应宽度不准确问题
			var that = this;
			uni.getSystemInfo({
				success: res => {
					that.comHeight = res.screenHeight / 2 - 30 + 'px';
				}
			});
			this.MatchingOrderInfo(); // 下单页面信息

			this.getDatas(); //获取近七天服务时间
		},

		methods: {
			// 获取所选的城市
			getLocationInfo() {
				var _this = this;
				uni.getStorage({
					key: 'siteName',
					success: res => {
						_this.siteName = res.data;
					},
					fail: resd => {
						//2. 获取地理位置
						uni.getLocation({
							type: 'wgs84',
							success(res) {
								let latitude, longitude;
								latitude = res.latitude.toString();
								longitude = res.longitude.toString();
								var myAmapFun = new amap.AMapWX({
									key: _this.http.mapVxKey
								});
								myAmapFun.getRegeo({
									location: '' + longitude + ',' + latitude +
									'', //location的格式为'经度,纬度'
									success: function(e) {
										_this.siteName = e[0].regeocodeData
											.addressComponent.city; //城市
										uni.setStorage({
											key: 'siteName',
											data: e[0].regeocodeData
												.addressComponent.city
										});
									},
									fail: function(info) {}
								});
							},
							fail(resd) {}
						});
					}
				});
			},
			// 去会员页面
			goMnmber() {
				uni.navigateTo({
					url: '../member/meCenter'
				})
			},
			// 用户信息
			getUserInfo() {
				var _this = this;
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'user/info'
				};
				let data = {};
				_this.http.httpTokenRequest(opts, data).then(res => {
					if (res.code == "200") {
						_this.userInfoVO = res.data.userInfoVO;
						_this.userInfoVO.money = parseFloat(_this.userInfoVO.money);
						if (_this.userInfoVO.money < _this.balancesForm.totalPay) {
							this.payType = 1;
						}
					}
				});
			},
			// 选中支付方式
			setPayType(type) {
				this.payType = type;
			},
			// 选中条件搜索商家
			goSearch(item) {
				console.log(item)
				this.form.condition = item.value;
				this.form.conditionTitle = item.label;
				this.form.showCondition = false;
				this.dataList = [];
				this.updataEntList();
			},
			// 输入面积确定事件
			subProportion() {
				if (this.form.num < this.form.minSelect) {
					this.showModel = true;
					this.content = '该服务最小数量是' + this.form.minSelect + '平方米';
					return false;
				} else if (this.form.num > this.form.maxSelect) {
					this.showModel = true;
					this.content = '该服务最大数量是' + this.form.maxSelect + '平方米';
					return false;
				} else {
					this.form.value = this.pageParam.title + this.form.num + '平方米';
					this.showProportion = false;
					this.pageParam.amount = this.form.num;
					this.dataList = [];
					this.getPayInfo();
					this.getEntLists();
				}
			},
			// 按面积输入框聚焦事件
			inputNumChange() {
				this.isInputNum = 0;
			},
			inputNumInput() {
				this.isInputNum = 1;
			},
			// 更改商家
			updataEnt(item) {
				// 防止重复点击造成不必要的服务器压力
				if (this.form.entId !== item.enterpriseId) {
					this.form.entId = item.enterpriseId;
					this.getPayInfo(); //支付明细
				}
			},
			// 查看服务内容
			lookServer() {
				uni.navigateBack({
					delta: 1
				});
			},
			// 选择查询条件
			updataEntList() {
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'business/book/ent/page2'
				};
				if (this.pageParam.entId !== 'undefined') {
					var data = {
						businessId: this.pageParam.businessId,
						sortedType: this.form.condition,
						bisOptionsId: this.pageParam.bisOptionsId,
						amount: this.form.num,
						specificId: this.form.selectServer,
						page: this.pageData.page,
						pageSize: this.pageData.pageSize,
						entId: this.pageParam.entId,
						city: this.siteName
					};
				} else {
					var data = {
						sortedType: this.form.condition,
						bisOptionsId: this.pageParam.bisOptionsId,
						businessId: this.pageParam.businessId,
						amount: this.form.num,
						specificId: this.form.selectServer,
						page: this.pageData.page,
						pageSize: this.pageData.pageSize,
						city: this.siteName
					};
				}
				this.http.httpTokenRequest(opts, data).then(res => {
					//打印请求返回的数据
					if (res.code == '200') {
						var arr = [...this.dataList, ...res.data.records];
						this.dataList = arr;
						this.form.entId = this.dataList[0].enterpriseId;
						this.contPage = res.data.pages;
						this.noClick = true;
						this.getPayInfo();
						// this.MatchingOrderInfo(); // 下单页面信息
					} else {
						this.noClick = true;
						uni.showToast({
							title: res.message,
							mask: true,
							icon: 'none',
							duration: 2000
						});
					}
				});
			},
			// 获取商家列表信息
			getEntLists() {
				this.dataList = [];
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'business/book/ent/page2'
				};
				if (this.pageParam.entId !== 'undefined') {
					var data = {
						businessId: this.pageParam.businessId,
						sortedType: this.form.condition,
						bisOptionsId: this.pageParam.bisOptionsId,
						amount: this.form.num,
						specificId: this.pageParam.chargeType == 3 ? this.form.selectServer : 0,
						page: this.pageData.page,
						pageSize: this.pageData.pageSize,
						entId: this.pageParam.entId,
						city: this.siteName
					};
				} else {
					var data = {
						businessId: this.pageParam.businessId,
						sortedType: this.form.condition,
						bisOptionsId: this.pageParam.bisOptionsId,
						amount: this.form.num,
						specificId: this.pageParam.chargeType == 3 ? this.form.selectServer : 0,
						page: this.pageData.page,
						pageSize: this.pageData.pageSize,
						city: this.siteName
					};
				}

				this.http.httpTokenRequest(opts, data).then(res => {
					//打印请求返回的数据
					if (res.code == '200') {
						var arr = [...this.dataList, ...res.data.records];
						this.dataList = arr;
						this.contPage = res.data.pages;
						this.noClick = true;
					} else {
						this.noClick = true;
						uni.showToast({
							title: res.message,
							mask: true,
							icon: 'none',
							duration: 2000
						});
					}
				});
			},
			// 获取初始化商家列表
			getEntList() {
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'business/book/ent/page2'
				};
				if (this.pageParam.entId !== 'undefined') {
					var data = {
						businessId: this.pageParam.businessId,
						sortedType: this.form.condition,
						bisOptionsId: this.pageParam.bisOptionsId,
						amount: this.pageParam.chargeType == 3 ? 1 : this.pageParam.amount,
						specificId: this.pageParam.chargeType == 3 ? this.pageParam.amount : 0,
						page: this.pageData.page,
						pageSize: this.pageData.pageSize,
						entId: this.pageParam.entId,
						city: this.siteName
					};
				} else {
					var data = {
						sortedType: this.form.condition,
						bisOptionsId: this.pageParam.bisOptionsId,
						businessId: this.pageParam.businessId,
						amount: this.pageParam.chargeType == 3 ? 1 : this.pageParam.amount,
						specificId: this.pageParam.chargeType == 3 ? this.pageParam.amount : 0,
						page: this.pageData.page,
						pageSize: this.pageData.pageSize,
						city: this.siteName
					};
				}
				this.http.httpTokenRequest(opts, data).then(res => {
					//打印请求返回的数据
					if (res.code == '200') {
						if (res.data.records.length == 0) {
							uni.hideLoading()
							uni.showModal({
								title: "提醒",
								content: "所选地区暂无服务商家",
								showCancel: false,
								success(res) {
									if (res.confirm) {
										uni.navigateBack({
											delta: 1
										})
									}
								}
							})
						} else {
							var arr = [...this.dataList, ...res.data.records];
							this.dataList = arr;
							this.form.entId = this.dataList[0].enterpriseId;
							this.contPage = res.data.pages;
							this.noClick = true;
							this.getPayInfo(); //支付明细
							// this.MatchingOrderInfo(); // 下单页面信息
						}

					} else {
						this.noClick = true;
						uni.showToast({
							title: res.message,
							mask: true,
							icon: 'none',
							duration: 2000
						});
					}
				});
			},
			//支付明细
			getPayInfo() {
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'business/book/pay/info'
				};
				let data = {
					businessId: this.pageParam.businessId,
					amount: this.form.num,
					specificId: this.pageParam.chargeType == '3' ? this.form.selectServer : 0,
					entId: this.form.entId,
					userCouponId: this.form.userCouponId,
					useBalance: 0
				};
				this.http.httpTokenRequest(opts, data).then(res => {
					//打印请求返回的数据
					if (res.code == '200') {
						this.balancesForm = res.data;
						this.balancesForm.totalPay = parseFloat(this.balancesForm.totalPay)
						this.form.userCouponId = this.balancesForm.userCouponId;
						this.getUserInfo();
						setTimeout(function() {
							uni.hideLoading()
						}, 200)

					} else {
						uni.showToast({
							title: res.message,
							mask: true,
							icon: 'none',
							duration: 2000
						});
					}
				});
			},
			// 选中日期
			selectData(item) {
				if (this.selectDemo.tTime == item.value) {
					//点击当前时间
				} else {
					if (item.children.length == 0) {
						uni.showToast({
							title: '点击的日期没有服务时间',
							mask: true,
							icon: 'none',
							duration: 2000
						});
					} else {
						this.selectDemo.tTime = item.value;
						this.selectDemo.hTime = item.ymrTime;
						this.listTime = item.children;
						this.selectDemo.ctTime = this.listTime[0].value;
						this.selectDemo.chTime = this.listTime[0].label;
					}
				}
			},
			// 选中日期
			selectHtime(item) {
				this.selectDemo.ctTime = item.value;
				this.selectDemo.chTime = item.label;
			},
			//点击确定的选中日期的值
			confirm(e) {
				this.form.result = this.selectDemo.hTime + ' ' + this.selectDemo.chTime;
				this.show = false;
			},
			// 选中规格
			selectMake(item) {
				if (this.selectFrom.id == item.specificId) {} else {
					this.selectFrom = {
						id: item.specificId,
						value: item.name,
						num: 1
					};
				}
			},
			// 确定规格
			subSpecification() {
				this.form.value = this.selectFrom.value;
				this.form.selectServer = this.selectFrom.id;
				this.form.num = this.selectFrom.num;
				this.pageParam.amount = this.form.selectServer;
				this.showServer = false;
				this.dataList = [];
				this.getPayInfo();
				this.getEntLists();
			},
			// 选中服务内容确定事件
			confirmUpdata(e) {
				this.form.value = this.pageParam.title + e[0].label;
				this.form.num = e[0].value;
				this.pageParam.amount = this.form.num;
				this.showUpdata = false;
				this.dataList = [];
				this.getPayInfo();
				this.getEntLists();
			},
			//更改服务
			updataServer() {
				if (this.pageParam.chargeType == '3') {
					if (this.selectFrom.id) {
						this.showServer = true;
					} else {
						this.selectFrom.id = this.serverList[0].specificId;
						this.selectFrom.value = this.serverList[0].specificName;
						this.selectFrom.num = 1;
					}
				} else if (this.pageParam.chargeType == '2') {
					this.showProportion = true;
				} else if (this.pageParam.chargeType == '1') {
					this.showUpdata = true;
				}
			},
			// 滚动到底部出发
			scrolltolower(e) {
				if (this.pageData.page < this.contPage && noClick) {
					this.noClick = false;
					this.pageData.page = this.pageData.page + 1;
					this.getEntLists();
				}
			},
			// 选择服务时间
			is_show() {
				this.show = true;
			},
			// 费用明细显示
			is_mingxi() {
				this.mingxi = !this.mingxi;
			},
			// 使用优惠劵
			jump_yhq() {
				uni.navigateTo({
					url: '../personal/choose_yhq?businessId=' +
						this.pageParam.businessId +
						'&enterpriseId=' +
						this.form.entId +
						'&amountMoney=' +
						this.balancesForm.totalPrice +
						'&specificId=' +
						this.form.selectServer +
						'&amount=' +
						this.form.num
				});
			},
			// 下单页面信息
			MatchingOrderInfo(type) {
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'business/book/info'
				};
				let data = {
					businessId: this.pageParam.businessId ? this.pageParam.businessId : '',
					addressId: this.addressId,
					specificId: this.pageParam.chargeType == 3 ? this.pageParam.amount : 0,
					createGroupOrderId: this.orderId
				};
				this.http.httpTokenRequest(opts, data).then(res => {
					//打印请求返回的数据
					if (res.code == '200') {
						this.openGroup = res.data.openGroup;
						this.groupReduce = res.data.groupReduce;
						this.addressId = res.data.addressId;
						this.pageParam.title = res.data.name;
						this.pageParam.img = res.data.banner;
						this.pageParam.chargeType = res.data.chargeType;
						this.pageParam.businessId = res.data.businessId;
						this.groupForm = {
							contactsPhone: res.data.contactsPhone,
							groupLeaderName: res.data.groupLeaderName,
							groupReduce: res.data.groupReduce,
						};
						this.address = {
							province: res.data.province,
							city: res.data.city,
							region: res.data.region,
							address: res.data.address,
							contactsPhone: res.data.contactsPhone,
							contactsName: res.data.contactsName
						};
						if (this.pageParam.chargeType == '1' && !type) {
							//按小时内容回显
							var minSelect = res.data.minSelect - 1;
							var maxSelect = res.data.maxSelect;
							for (minSelect; minSelect < maxSelect; minSelect++) {
								this.typeList.push({
									value: minSelect + 1,
									label: minSelect + 1 + '小时'
								});
							}
							if (this.pageParam.amount) {

							} else {
								this.pageParam.amount = this.typeList[0].value
							}
							this.form.value = this.pageParam.title + this.pageParam.amount + '小时';
							this.form.num = this.pageParam.amount;
							// this.getPayInfo(); //支付明细
							this.dataList=[];
							this.pageData.page=1;
							this.getEntList(); //获取商家列表
						}
						 if (this.pageParam.chargeType == '2') {
							//按面积回显
							this.form.minSelect = res.data.minSelect;
							this.form.maxSelect = res.data.maxSelect;
							if (this.pageParam.amount) {

							} else {
								this.pageParam.amount = this.form.minSelect;
							}
							this.form.value = this.pageParam.title + this.pageParam.amount + '平方米';
							this.form.num = this.pageParam.amount;
							// this.getPayInfo(); //支付明细
							this.dataList=[];
							this.pageData.page=1;
							this.getEntList(); //获取商家列表
						} else if (this.pageParam.chargeType == '3') {
							//按规格回显
							this.getAllSpecification(type);
						}
					} else {
						this.$refs.uToast.show({
							title: res.message,
							type: 'error'
						});
					}
				});
			},
			// 获取所有规格
			getAllSpecification(type) {
				var that = this;
				let opts = {
					way: true,
					method: 'post',
					url: 'business/options'
				};
				let data = {
					businessId: that.pageParam.businessId
				};
				that.http.httpTokenRequest(opts, data).then(res => {
					if (res.code == 200) {
						var array = res.data;

						if (array.length > 0) {
							if (type) {
								that.dataList=[];
								that.pageData.page=1;
								that.getEntList();
							} else {
								if (that.pageParam.amount) {
									array.forEach(item => {
										if (that.pageParam.amount == item.specificId) {
											that.selectFrom = {
												id: item.specificId,
												value: item.name,
												num: that.form.num
											};
											that.form.value = item.name;
											that.form.selectServer = item.specificId;
											that.form.num = that.selectFrom.num;
											that.dataList=[];
											that.pageData.page=1;
											that.getEntList();

										}
									});
								} else {
									that.selectFrom = {
										id: array[0].specificId,
										value: array[0].name,
										num: that.form.num
									};
									that.form.value = array[0].name;
									that.form.selectServer = array[0].specificId;
									that.form.num = that.selectFrom.num;
									that.dataList=[];
									that.pageData.page=1;
									that.getEntList();
								}
								that.serverList = array;
							}
						}
					} else {
						uni.showToast({
							title: res.message,
							mask: true,
							icon: 'none',
							duration: 2000
						});
					}
				});
			},
			//点击使用或不使用积分
			radioChange(e) {
				this.form.checkeds = !this.form.checkeds;
				this.getPayInfo();
			},
			// 去添加地址
			adds(type) {
				if (type == 1) {
					uni.navigateTo({
						url: '../personal/addAddress?type=0'
					});
				} else {
					uni.navigateTo({
						url: '../personal/address?type=2'
					});
				}
			},
			// 下单
			fast() {
				// this.groupType = 0;
				// this.payorder = true;
				this.promptlyPay();
			},
			// 立即支付
			promptlyPay() {
				var _this = this;
				if (_this.addressId == 0 || !_this.addressId) {
					uni.showToast({
						title: '未选择地址',
						mask: true,
						icon: 'none',
						duration: 2000
					});
					return false;
				} else if (_this.form.entId == 0 || !_this.form.entId) {
					uni.showToast({
						title: '未有可匹配的商家',
						mask: true,
						icon: 'none',
						duration: 2000
					});
					return false;
				}
				_this.clickPay = false;
				uni.showLoading({
					title: "正在支付...",
					mask: true,
				})
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'unit-orders/creatDailyOrder',
				};
				let data = {
					businessId: _this.pageParam.businessId,
					specificId: _this.pageParam.chargeType == 3 ? _this.pageParam.amount : 0,
					enterpriseId: _this.form.entId,
					amount: _this.form.num,
					couponId: _this.form.userCouponId,
					usedBalances: 0,//目前积分抵扣
					groupOrderId: _this.orderId,
					groupType: _this.groupType,
					userAddressId: _this.addressId,
					startTime: _this.form.result,
					payType: 1,//抖音小程序暂不支持余额支付，也就是会员功能,1是微信
					thirdPayType:1,//支付环境。1微信小程序，2抖音小程序
				};
				_this.http.httpTokenRequest(opts, data).then(res => {
					if (res.code == 200) {
						var needstr = res.data;
						uni.hideLoading()
						uni.requestSubscribeMessage({
							tmplIds: ['IdSIZcF3KlfXRiP4wvU4jwt6hu2tU2LnbsUPfF_Tq80',
								'EjQNBMRd3C1y7Y1OMAyLn7sLsRNoolBBV42v1btLchw'
							],
							success(res) {
								if (needstr.needPay == 0) {
									
									if (_this.groupType == 1) {
										uni.redirectTo({
											url: './spellGroup?orderId=' + needstr.orderId +
												"&img=" + _this.pageParam.img
										});
									} else if (_this.groupType == 2) {
										uni.redirectTo({
											url: '../order/paySucess?type=3' + '&orderId=' +
												needstr.orderId
										});
									} else {
										uni.redirectTo({
											url: '../order/paySucess?type=1' + '&orderId=' +
												needstr.orderId
										});
									}

									_this.clickPay = true;
									_this.payorder = false;
								} else {
									_this.wxpay(needstr.vxPayData, needstr.orderId);
								}
							},
							fail(err) {
								if (needstr.needPay == 0) {
									if (_this.groupType == 1) {
										uni.redirectTo({
											url: './spellGroup?orderId=' + needstr.orderId +
												"&img=" + _this.pageParam.img
										});
									} else if (_this.groupType == 2) {
										uni.redirectTo({
											url: '../order/paySucess?type=3' + '&orderId=' +
												needstr.orderId
										});
									} else {
										uni.redirectTo({
											url: '../order/paySucess?type=1' + '&orderId=' +
												needstr.orderId
										});
									}
									_this.clickPay = true;
									_this.payorder = false;
								} else {
									_this.wxpay(needstr.vxPayData, needstr.orderId);
								}
							}
						});
					} else {
						uni.hideLoading();
						_this.clickPay = true;
						_this.payorder = false;
						_this.content = res.message;
						_this.showModel = true;
					}
				});
			},
			wxpay(str, orderId) {
				let _this = this;
				let query = str;
				uni.requestPayment({
					provider: 'wxpay',
					appId: query.appId,
					timeStamp: query.timeStamp + '',
					nonceStr: query.nonceStr,
					package: query.package,
					signType: query.signType,
					paySign: query.sign,
					success(res) {
						console.log('success')
						// 从微信查询订单中拿到 code == 0  字节跳动会判断支付成功，会改变收银台状态为完成。逻辑可以再这里处理。
						uni.redirectTo({
								url: '../order/paySucess?type=1' + '&orderId=' + orderId
						});
						_this.clickPay = true;
						_this.payorder = false;
				
						
					},
					// 调起收银台失败处理逻辑
					fail(res) {
						console.log(res)
						// 调起收银台失败处理逻辑
						_this.clickPay = true;
						_this.payorder = false;
						_this.$refs.uToast.show({
							title: '支付失败',
							type: 'error'
						});
					}
				});
				// uni.requestPayment({
				// 	provider: 'wxpay',
				// 	appId: query.appId,
				// 	timeStamp: query.timeStamp + '',
				// 	nonceStr: query.nonceStr,
				// 	package: query.package,
				// 	signType: query.signType,
				// 	paySign: query.sign,
				// 	success: res => {
				// 		if (_this.groupType == 1) {
				// 			uni.redirectTo({
				// 				url: './spellGroup?orderId=' + orderId + "&img=" + _this.pageParam.img
				// 			});
				// 		} else if (_this.groupType == 2) {
				// 			uni.redirectTo({
				// 				url: '../order/paySucess?type=3' + '&orderId=' + orderId
				// 			});
				// 		} else {
				// 			uni.redirectTo({
				// 				url: '../order/paySucess?type=1' + '&orderId=' + orderId
				// 			});
				// 		}
				// 		_this.clickPay = true;
				// 		_this.payorder = false;
				// 	},
				// 	fail: val => {
				// 		_this.clickPay = true;
				// 		_this.payorder = false;
				// 		_this.$refs.uToast.show({
				// 			title: '支付失败',
				// 			type: 'error'
				// 		});
				// 	}
				// });
			},
			//根据日期 得到是星期几
			getWeekByDay(dayValue) {
				var day = new Date(Date.parse(dayValue.replace(/-/g, '/'))); //将日期值格式化
				var today = new Array('周日', '周一', '周二', '周三', '周四', '周五', '周六'); //创建星期数组
				return today[day.getDay()]; //返一个星期中的某一天，其中0为星期日
			},
			// 拼团支付
			paySpell() {
				this.payorder = true;
				if (this.groupType == 0) {
					this.groupType = 1;
				} else if (this.groupType == 2) {

				}

			},
			// 获取后七天时间
			getDatas() {
				var arr = [];
				var _this = this;
				var date = new Date();
				var year = date.getFullYear();
				var mon = date.getMonth() + 1;
				var day = date.getDate();
				if (mon <= 9) {
					//如果小于9的话，则需要加上0
					mon = '0' + mon;
				} //getdate()返回的是1-31，则不需要加1
				if (day <= 9) {
					//如果小于9的话，则需要加上0
					day = '0' + day;
				}
				var ymrTime = year + '-' + mon + '-' + day;
				var showDate = day;
				var nextData = '';
				var items = [];
				if (_this.pageParam.businessId !== "25") {
					for (var i = 1; i <= 6; i++) {
						//后7天
						date.setDate(date.getDate() + 1);
						var mons = date.getMonth() + 1;
						if (mons <= 9) {
							mons = '0' + mons;
						}
						var days = date.getDate();
						if (days <= 9) {
							days = '0' + days;
						}
						nextData = date.getFullYear() + '-' + mons + '-' + days;
						var timeName = this.getWeekByDay(nextData);
						arr.push({
							value: i + 1,
							timeName: timeName,
							label: days,
							ymrTime: nextData
						});
					}
					var datas = [{
							value: 2,
							label: '08:00'
						},
						{
							value: 3,
							label: '09:00'
						},

						{
							value: 4,
							label: '10:00'
						},
						{
							value: 5,
							label: '11:00'
						},
						{
							value: 6,
							label: '12:00'
						},
						{
							value: 7,
							label: '13:00'
						},
						{
							value: 8,
							label: '14:00'
						},

						{
							value: 9,
							label: '15:00'
						},
						{
							value: 10,
							label: '16:00'
						},
						{
							value: 11,
							label: '17:00'
						},
						{
							value: 12,
							label: '18:00'
						},
						{
							value: 13,
							label: '19:00'
						}
					];
					var nowtime = date.getHours();
					var indexs = null;
					if (nowtime < parseInt(datas[0].label.substring(0, 2))) {
						indexs = 0;
					} else {
						datas.forEach((item, index) => {
							var tex = parseInt(item.label.substring(0, 2));
							if (tex == nowtime) {
								indexs = index;
							}
						});
					}

					if (indexs || indexs == 0) {
						var arrayInex = datas.splice(0, indexs + 4);
					} else {
						if (nowtime < parseInt(datas[0].label.substring(0, 2))) {} else {
							datas = [];
						}
					}
					if (19 > nowtime) {
						items.push({
							value: 1,
							timeName: '今天',
							label: showDate,
							ymrTime: ymrTime
						});
					} else {
						items.push({
							value: 1,
							timeName: '今天',
							label: showDate,
							ymrTime: ymrTime
						});
					}

					items = items.concat(arr);
				} else {
					for (var i = 1; i <= 7; i++) {
						//后7天
						date.setDate(date.getDate() + 1);
						var mons = date.getMonth() + 1;
						if (mons <= 9) {
							mons = '0' + mons;
						}
						var days = date.getDate();
						if (days <= 9) {
							days = '0' + days;
						}
						nextData = date.getFullYear() + '-' + mons + '-' + days;
						var timeName = this.getWeekByDay(nextData);
						arr.push({
							value: i + 1,
							timeName: timeName,
							label: days,
							ymrTime: nextData
						});
					}
					var indexs = 1;
					var datas = [{
							value: 2,
							label: '08:00'
						},
						{
							value: 3,
							label: '09:00'
						},

						{
							value: 4,
							label: '10:00'
						},
						{
							value: 5,
							label: '11:00'
						},
						{
							value: 6,
							label: '12:00'
						},
						{
							value: 7,
							label: '13:00'
						},
						{
							value: 8,
							label: '14:00'
						},

						{
							value: 9,
							label: '15:00'
						},
						{
							value: 10,
							label: '16:00'
						},
						{
							value: 11,
							label: '17:00'
						},
						{
							value: 12,
							label: '18:00'
						},
						{
							value: 13,
							label: '19:00'
						}
					];
					items = arr
				}

				items.forEach((item, index) => {
					if (index == 0 && datas.length >= 0) {
						item.children = datas;
					} else {
						item.children = [{
								value: 2,
								label: '08:00'
							},
							{
								value: 3,
								label: '09:00'
							},

							{
								value: 4,
								label: '10:00'
							},
							{
								value: 5,
								label: '11:00'
							},
							{
								value: 6,
								label: '12:00'
							},
							{
								value: 7,
								label: '13:00'
							},
							{
								value: 8,
								label: '14:00'
							},

							{
								value: 9,
								label: '15:00'
							},
							{
								value: 10,
								label: '16:00'
							},
							{
								value: 11,
								label: '17:00'
							},
							{
								value: 12,
								label: '18:00'
							},
							{
								value: 13,
								label: '19:00'
							}
						];
					}
				});
				if (datas.length == 0) {
					this.list = items;
					this.selectDemo.tTime = this.list[1].value;
					this.selectDemo.hTime = this.list[1].ymrTime;
					this.listTime = this.list[1].children;
					this.selectDemo.ctTime = this.listTime[0].value;
					this.selectDemo.chTime = this.listTime[0].label;
					this.form.result = this.selectDemo.hTime + ' ' + this.selectDemo.chTime;
				} else {
					this.list = items;
					this.selectDemo.tTime = this.list[0].value;
					this.selectDemo.hTime = this.list[0].ymrTime;
					this.listTime = this.list[0].children;
					this.selectDemo.ctTime = this.listTime[0].value;
					this.selectDemo.chTime = this.listTime[0].label;
					this.form.result = this.selectDemo.hTime + ' ' + this.selectDemo.chTime;
				}
			}
		}
	};
</script>

<style scoped lang="scss">
	.head {
		background: #ffffff;
		opacity: 1;
		width: 91%;
		margin: auto;
		padding: 20rpx 0rpx;
		color: #3f3f3f;
		font-size: 30rpx;
		font-weight: 400;
	}

	.fenlei {
		display: flex;
		flex-wrap: wrap;
		// padding: 16rpx 24rpx 0 42rpx;
	}

	.type {
		background: #ffffff;
		// border: 1px solid #fca800;
		opacity: 1;
		// border-radius: 52rpx;
		padding: 0 13px;
		line-height: 74rpx;
		font-size: 26rpx;
		text-align: center;
		font-family: PingFang SC;
		font-weight: 400;
		margin-right: 20rpx;
		margin-top: 20rpx;
		border-radius: 10rpx;
	}

	.u-icon-minus,
	.u-icon-plus {
		border-radius: 30rpx !important;
	}

	.type image {
		width: 32rpx;
		height: 32rpx;
		position: absolute;
		bottom: -20%;
		right: -10%;
	}

	.fen_type .tai {
		font-size: 30rpx;
	}

	.serve {
		font-size: 26rpx;
		color: #3f3f3f;
		font-weight: 400;
		display: flex;
		// justify-content: space-between;
		align-items: center;
		margin-top: 20rpx;
	}

	.fuwu {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.fuwu image {
		width: 10rpx;
		height: 18rpx;
	}

	.contact {
		margin-top: 22rpx;
	}

	.contact .namm {
		// padding-left: 16rpx;
		font-size: 30rpx;
		color: #7a7a7a;
		font-weight: bold;
	}

	.contact .ads {
		padding-left: 25rpx;
		font-size: 26rpx;
	}

	.xiang {
		width: 200rpx;
		font-size: 26rpx;
	}

	.biaozhu {
		color: #f86565;
		display: flex;
		align-items: center;
		font-size: 26rpx;
		height: 64rpx;
		padding-left: 28rpx;
		padding-right: 18rpx;
		background-color: #fff4de;
		line-height: 62rpx;
	}

	.biaozhus {
		color: #f86565;
		display: flex;
		align-items: center;
		font-size: 26rpx;
		height: 64rpx;
		padding-left: 28rpx;
		padding-right: 90rpx;
		line-height: 64rpx;
	}

	.biaozhus image {
		width: 29rpx;
		height: 29rpx;
	}

	.biaozhu image {
		width: 29rpx;
		height: 29rpx;
	}

	.choose {
		width: 91%;
		margin: auto;
		font-size: 30rpx;
		color: #3f3f3f;
		font-weight: 400;
		margin-top: 32rpx;
	}

	.biao_zhu {
		color: #979797;
		padding: 12rpx 0 20rpx 64rpx;
		font-size: 26rpx;
		margin-top: 92rpx;
	}

	.zhu {
		font-size: 30rpx;
	}

	.biao_zhu .write {
		padding-right: 182rpx;
		margin-top: 20rpx;
		line-height: 36rpx;
	}

	.time {
		display: flex;
		align-items: center;
		width: 92%;
		margin: auto;
		line-height: 100rpx;
	}

	.start {
		font-size: 30rpx;
		color: #3f3f3f;
		font-weight: 400;
	}

	.xuanze {
		display: flex;
		text-align: right;
		width: 50%;
	}

	.xuanze view {
		width: 90%;
		line-height: 32rpx;
		color: #979797;
	}

	.xuanze image {
		width: 18rpx;
		height: 30rpx;
	}

	.t_img {
		width: 24rpx;
		height: 40rpx;
	}

	.foot {
		position: fixed;
		z-index: 99;
		background-color: #ffffff;
		bottom: 0;
		width: 100%;
		font-size: 26rpx;
		color: #707070;
		border-top: 1rpx solid #dfdfdf;
	}

	.footer {
		// height: 112rpx;
		position: fixed;
		z-index: 99;
		bottom: 0;
		width: 100%;
		background: #ffffff;
		opacity: 1;
	}

	.foot_mon {
		display: flex;
		justify-content: space-between;
		align-items: center;
		// padding: 26rpx 38rpx 20rpx 40rpx;
	}

	.writes {
		font-size: 38rpx;
		font-weight: 500;
	}

	.writes text {
		color: #fa5151;
	}

	.fen_types {
		display: flex;
		align-items: center;
		color: #3f3f3f;
		font-size: 40rpx;
	}

	.fen_types input {
		width: 164rpx;
		// height: 104rpx;
		// margin: 30rpx 36rpx 28rpx 48rpx;
		// box-shadow: 0px 3rpx 6rpx rgba(241, 179, 10, 0.33);
		// border-radius: 10rpx;
		padding: 0 20rpx;
		border-bottom: 2rpx solid #b8b7b7;
	}

	.fenlei .acts {
		color: #fc8a17;
		border: 2rpx solid #fc8a17;
		// box-shadow: 0px 3rpx 6rpx rgba(241, 179, 10, 0.37);
		// background-color: #fca800;
	}

	.fenlei .acts_2 {
		border: 2rpx solid #c2c2c2;
	}

	.actss {
		color: #fca800;
	}
</style>
